package generic;

public class Test6 {
    public static void main(String[] args) {
        ShowMsg showMsg = new ShowMsg();
        Generic<Integer> generic = new Generic<>();
        generic.setFlag(20);
        showMsg.showFlag1(generic);//通配符
        showMsg.showFlag2(generic);//上限限定
        showMsg.showFlag3(generic);//下限限定

        Generic<Number> generic1 = new Generic<>();
        generic1.setFlag(50);
        showMsg.showFlag1(generic1);
        showMsg.showFlag2(generic1);
        showMsg.showFlag3(generic1);

        Generic<String> generic2 = new Generic<>();
        generic2.setFlag("kite");
        showMsg.showFlag1(generic2);
       // showMsg.showFlag2(generic2);//通配符上限限定
        // showMsg.showFlag3(generic2);//通配符下限限定
    }
}
